// 页面路径：store/index.js 
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);//vue的插件机制

//Vuex.Store 构造器选项
const store = new Vuex.Store({
    state: {//存放状态
        // standing: 'manage',//登录身份  user用户  manage管理
        standing: 'user',//登录身份  user用户  manage管理
        bg_normal_user: 'https://sppcp-1322907932.cos.ap-beijing.myqcloud.com/app/img_6.png',
        bg_normal_manage: 'https://sppcp-1322907932.cos.ap-beijing.myqcloud.com/app/img_6.png',
    },
    mutations: {
        _standing(state, data) {
            state.standing = data;
        },
    },
    actions: {
        setStanding(context, data) {
            context.commit('_standing', data);
        },
    }
})
export default store